export default class{
	iphonex = false;
	ios = false;
	system = '-';
	platform = '-';
	constructor(){
		this.platform = uni.getSystemInfoSync().platform
		uni.getSystemInfo({
		  success: res => {
		    var system = res.system?res.system:'';
		    var model = res.model?res.model:'';
			model = model.replace(' ', '').toLowerCase();
			system = system.replace(' ', '').toLowerCase();
			
		    if (model.indexOf('iphonex') >= 0) this.iphonex = true;
		    if (model.indexOf('iphone11') >= 0) this.iphonex = true; // console.log(system)
		    if (system.indexOf('ios11') >= 0) this.iphonex = true; // console.log(system)
		
		    if (system.indexOf('ios') >= 0) {
		      this.system = 'ios';
		      this.ios = true;
		    } else if (system.indexOf('android') >= 0) {
		      this.system = 'android';
		      this.ios = false;
		    } else {
		      this.system = 'pc';
		      this.ios = false;
		    } // console.log('system.' + this.data.system)
			  
		  }
		});
	}
	
}